import {checktoken} from '@/api/api.js'
 const islogin  =(_this)=>{
	let userInfo = _this.$store.state.userInfo
	if(userInfo){
	console.log(userInfo);
		let {token} = userInfo
		checktoken({"token":token}).then(res=>{
			console.log(res);
			if(res.data.code==200){				
				uni.setTabBarItem({
					index:3,
					text:"我的"
				})
				
			}else{
				uni.setTabBarItem({
					index:3,
					text:"未登录"
				})
			uni.removeStorageSync("userinof")
			}

		})
	}else{
		
		uni.setTabBarItem({
			index:3,
			text:"未登录"
		})
		
	}
	
	
}
export default islogin